-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating an account with MAS, change the prompt
parameter to create
#3635
Conversation
} | ||
appendQueryParameter(key, value) | ||
}.build() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only appendQueryParameter
exists in Uri.Builder
, so sadly, I had to create this extension.
// In this case, add or replace the "prompt" parameter to "create" | ||
val newUrl = oidcDetails.url.toUri() | ||
.setQueryParameter("prompt", "create") | ||
.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the provided value for the "prompt" parameter on beta.matrix.org is "consent".
prompt
parameter to create
prompt
parameter to create
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is right, although I'm surprised the SDK doesn't surface this parameter?
There is a setter here: https://github.com/matrix-org/matrix-rust-sdk/blob/9c6413551cd6e15f01453e57178fe98e0d12200b/crates/matrix-sdk/src/oidc/auth_code_builder.rs#L77-L80
Which is being used here: https://github.com/matrix-org/matrix-rust-sdk/blob/9c6413551cd6e15f01453e57178fe98e0d12200b/crates/matrix-sdk/src/oidc/mod.rs#L473
And exposed in the bindings here: https://github.com/matrix-org/matrix-rust-sdk/blob/9c6413551cd6e15f01453e57178fe98e0d12200b/bindings/matrix-sdk-ffi/src/client.rs#L367
I feel like there should be an url_for_oidc_registration
equivalent in the SDK?
OK so maybe we could improve the existing Rust API, to replace @jmartinesp do you think this would be possible? |
From a very quick look at the code, it seems feasible, although I'd rather make the |
Yes, an enum would be better than a String. Thanks! |
Closing this we will get a better way to handle this thanks to Jorge's work in matrix-org/matrix-rust-sdk#4131. |
Content
When user is creating account, load the url page directly in the account creation mode by changing (or adding) the
prompt
url parameter tocreate
.@sandhose does it make sense to you?
Motivation and context
Improve user experience with MAS and closes #3627
Screenshots / GIFs
MAS-account_creation_before.mp4
MAS-account_creation_after.mp4
Tests
Tested devices
Checklist